import { useEffect, useState } from 'react'
import { getPhoto } from '@/api'

import './emoji.scss'

export default function Album () {
  const [imgs, setImgs] = useState<string[]>([])
  useEffect(() => {
    getPhoto().then((res) => {
      console.log(res)
      setImgs(res.data)
    })
  }, [])

  return (
    <div className="emoji-page">
      {imgs.map(img => <img key={img} className="img" src={img + '&imageMogr2/thumbnail/400x400'} />)}
    </div>
  )
}
